# Converting the nParticles to an output mesh

In this section of the lesson, you convert the nParticle_slag object to an output mesh. Converting the nParticle system to an output mesh lets you take greater advantage of rendering effects, such as shader networks, textures, and motion blur, to finish off the simulation.

After the nParticles are converted to an output mesh, you can still use the nParticle object attributes to adjust the behavior of the slag.

To convert the nParticle object to an output mesh

1. In the Outliner, select the nParticle_slag object and select Modify > Convert > nParticle to Polygons.

   Notice that the particles are no longer displayed in the scene. When converted to a mesh, the nParticle_slag object becomes an intermediate object, which is not visible. This reduces simulation time and makes it easier to see how Output Mesh attribute adjustments affect the mesh behavior.

   NOTE:To make the nParticle object appear in the scene, in the Object Display section of the nParticle_slagShape node Attribute Editor, turn off Intermediate Object. You will need to do this later in the tutorial.
2. In the Outliner, rename the polySurface1 to geo_slag.
3. Rewind and play the simulation.

   Notice that the output mesh is interpenetrating the nRigid_tub geometry. Adjusting the nParticle object Blobby Radius Scale and Threshold values can help fix the interpenetrations.

4. In the Outliner, select the nParticle_slag object, then click the nParticle_slagShape tab in the Attribute Editor.
5. In the Output Mesh section, set the following:
   - Threshold: 0.55
   - Blobby Radius Scale: 3.66
   - Mesh Triangle Size: 0.25
   - Max Triangle Resolution: 200
   - Mesh Method: Quad Mesh
   - Mesh Smoothing Iterations: 2

   For information about Output Mesh attributes, see nParticleShape Output Mesh attributes in the Maya Help.

6. Rewind and play the simulation.

   Notice that the output mesh no longer interpenetrates the nRigid_tub geometry.

   Also notice that generating an nParticle mesh slows down the simulation. In particular, low Mesh Triangle Size values and Mesh Smoothing Iterations greater than 3 can quickly slow simulation time and decrease overall performance. However, both settings increase the quality of the mesh. For larger simulations involving output meshes, caching the nParticles can decrease simulation time.

   In the next section you set Nucleus solver attributes to further improve the appearance and behavior of the mesh.